
package com.work.util;

import java.util.*;

import com.vaadin.ui.TextField;
import com.work.db.entity.OvertimeFieldEnum;

public class OvertimeFieldPair {
	private TextField beginField;
	private TextField endField;

	public OvertimeFieldPair() {
		super();
	}

	public void setField(String fieldName, TextField field)
	{
		if (OvertimeFieldEnum.BEGIN.getFieldName().equals(fieldName)) {
			beginField = field;
		} else if (OvertimeFieldEnum.END.getFieldName().equals(fieldName)) {
			endField = field;
		}
	}
	
	public List<TextField> getFields() {
		List<TextField> fields = new ArrayList<TextField>();
		fields.add(beginField);
		fields.add(endField);
		
		return fields;
	}
}
